extends Control


func _on_炮击_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_炮台_IMPACT):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.炮台_impact)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_二转_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	$"../转型弹框".showDialog_secondaryEvolve("炮台")


func _on_炮击_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("炮击：消耗1点能量，发送炮弹远程攻击")


func _on_二转_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("二转：消耗2点能量，拥有3个炮台可转狙炮")

func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
